package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.TBaseStorageAreaLocation;
import com.ruoyi.system.service.WarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/warehouse")
public class WarehouseController {



    @Autowired
    private WarehouseService warehouseService;

    @GetMapping("/layout")
    public Map getWarehouseLayout() {
        return warehouseService.getWarehouseData();
    }

    @PostMapping("/list")
    public AjaxResult selectWarehouseData(@RequestBody TBaseStorageAreaLocation location) {
        return warehouseService.getList(location);
    }
}
